using System;
namespace ch.ethz.ssh2
{
	
	/// <summary> A callback interface used to implement a client specific method of checking
	/// server host keys.
	/// 
	/// </summary>
	/// <author>  Christian Plattner
	/// </author>
	/// <version>  2.50, 03/15/10
	/// </version>
	
	public interface ServerHostKeyVerifier
	{
		/// <summary> The actual verifier method, it will be called by the key exchange code
		/// on EVERY key exchange - this can happen several times during the lifetime
		/// of a connection.
		/// <p>
		/// Note: SSH-2 servers are allowed to change their hostkey at ANY time.
		/// 
		/// </summary>
		/// <param name="hostname">the hostname used to create the {@link Connection} object
		/// </param>
		/// <param name="port">the remote TCP port
		/// </param>
		/// <param name="serverHostKeyAlgorithm">the public key algorithm (<code>ssh-rsa</code> or <code>ssh-dss</code>)
		/// </param>
		/// <param name="serverHostKey">the server's public key blob
		/// </param>
		/// <returns> if the client wants to accept the server's host key - if not, the
		/// connection will be closed.
		/// </returns>
		/// <throws>  Exception Will be wrapped with an IOException, extended version of returning false =) </throws>
		bool verifyServerHostKey(System.String hostname, int port, System.String serverHostKeyAlgorithm, byte[] serverHostKey);
	}
}